<html>
<head><meta charset="utf-8"><title>How do I get a dummy DefId? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/How.20do.20I.20get.20a.20dummy.20DefId.3F.html">How do I get a dummy DefId?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="207734520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/How%20do%20I%20get%20a%20dummy%20DefId%3F/near/207734520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/How.20do.20I.20get.20a.20dummy.20DefId.3F.html#207734520">(Aug 22 2020 at 17:44)</a>:</h4>
<p>I know it will be never used, but the type signature requires it. I know there's <code>HirId::DUMMY_ITEM_LOCAL_ID</code>, but can I turn that into a DefId?</p>



<a name="207734745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/How%20do%20I%20get%20a%20dummy%20DefId%3F/near/207734745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/How.20do.20I.20get.20a.20dummy.20DefId.3F.html#207734745">(Aug 22 2020 at 17:50)</a>:</h4>
<p>ok looks like <code>DefId::local(0)</code> will work</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>